package cn.stylefeng.guns.modular.gridsystem.model.param;

import cn.stylefeng.guns.core.pojo.base.param.BaseParam;

import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 网关场景表
 *
 * @author zxw
 * @date 2022/11/08 16:22
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GatewaySceneParam extends BaseParam {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {edit.class, delete.class, detail.class, addTemplate.class})
    private Long id;

    /**
     * 场景名称
     */
    @NotNull(message = "场景名称不能为空", groups = {add.class, edit.class})
    @Size(max = 200, message = "场景名称不能超过最大长度200", groups = {add.class, edit.class})
    private String sceneName;

    /**
     * 备注
     */
    @Size(max = 300, message = "备注不能超过最大长度300", groups = {add.class, edit.class})
    private String remark;

    /**
     * create_time
     */
    private Date createTime;

    /**
     * create_user
     */
    private Long createUser;

    /**
     * update_time
     */
    private Date updateTime;

    /**
     * update_user
     */
    private Long updateUser;

    /**
     * 配置模板主键列表
     */
    @NotNull(message = "配置模板主键列表不能为空", groups = {addTemplate.class})
    private List<Long> templateIds;

    /**
     * 配置模板主键
     */
    @NotNull(message = "配置模板主键列表不能为空", groups = {deleteTemplate.class})
    private Long templateId;

    /**
     * 添加模板
     */
    public @interface addTemplate {
    }

    /**
     * 删除模板
     */
    public @interface deleteTemplate {
    }

}
